<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=iso-8859-1" language="java"  errorPage="" %>
<jsp:directive.page import="cbm.commons.SessionContainer"/>
<jsp:directive.page import="cbm.commons.ConstantsWeb"/>
<jsp:directive.page import="cbm.commons.ResultadoOperacionBean"/>
<%
	SessionContainer sc = (SessionContainer)session.getAttribute(ConstantsWeb.SESSION_CONTAINER);
	ResultadoOperacionBean resultadoOPeracion =   (ResultadoOperacionBean)sc.getTemporalElement(ConstantsWeb.RESULTADO_OPERACION);
%>
<html>
<head>
<title>Continuidad Banca Minorista</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/estilos.css"/>
<script src="<%=request.getContextPath() %>/js/util/utiles.js" language="javascript"></script>
<script src="<%=request.getContextPath() %>/js/util/utf8.js"  language="javascript"></script>
<script src="<%=request.getContextPath() %>/js/util/prototype.js"  language="javascript"></script>
<script src="<%=request.getContextPath() %>/js/util/util_popup.js" language="javascript"></script>

<script language="JavaScript">
	var myGlobalHandlers = {
		onCreate: function(){
			Element.show('systemWorking');
		},

		onComplete: function() {
			if(Ajax.activeRequestCount == 0){
				Element.hide('systemWorking');
			}
		}
	};
	Ajax.Responders.register(myGlobalHandlers);
</script>

<script type="text/javascript">

	function f_buscar(){
		$('btnBuscar').disabled;
		var pars = $('form1').serialize();
		var action = '<%=request.getContextPath()%>/perfil.do?method=buscar';
		
		var myAjax = new Ajax.Updater(
			$('detalle'),
			action, 
			{ 
				method: 'post',
				parameters: pars
			}
		);
		$('btnBuscar').enabled;
	}
	
	function f_limpiar(){
		document.forms[0].reset();
	}
	
	function f_modificar(codigoperfil){
		var params = "dialogHeight:195px;dialogWidth:600px;center:yes;help:no;resizable:no";
		var url    = "<%=request.getContextPath()%>/perfil.do?method=openMantenimiento&codigoPerfil="+codigoperfil;
		open_popup(url, params);
	}
	
	function f_eliminar(codigoperfil){
		var f = document.forms[0];
		f.hidCodigoPerfil.value  = codigoperfil;
		
		var pars = $('form1').serialize();
		var action = '<%=request.getContextPath()%>/perfil.do?method=eliminar'
		
		var myAjax = new Ajax.Updater(
			$('detalle'),
			action, 
			{ 
				method: 'post',
				parameters: pars
			}
		);
	}

	function f_nuevo(){
		var params = "dialogHeight:195px;dialogWidth:600px;center:yes;help:no;resizable:no";
		var url    = "<%=request.getContextPath()%>/perfil.do?method=openMantenimiento";
		open_popup(url, params);
	}
	
	function f_opciones(codigoperfil){
		var url    = "<%=request.getContextPath()%>/perfil.do?method=openPerfilOpcion&codigoPerfil="+codigoperfil;
		open_popup2(url, 750,400);
	}
</script>
</head>
<body>

			
			
			
<form name="form1" id="form1" method="post" action="<%=request.getContextPath()%>/perfil.do?method=buscar">
	<input type="hidden" name="hidCodigoPerfil" id="hidCodigoPerfil"  value=""/>
<table width="100%" align="center" height="100%">
	<tr>
		<td valign="top" height="140px">
			<div id="maestro">
				<table align="left" cellspacing="3" class="table3" width="100%">
					<tr>
						<td colspan="6" class="cuadrotitle">I. Gestionar Perfiles</td>
					</tr>
					<tr class="cuadrocontent">
						<td width="10%">&nbsp;</td>
						<td class="tcelda1" width="17%">C&oacute;digo</td>
						<td width="21%">
							<input type="text" 
								   name="txtCodigoPerfil"
								   id="txtCodigoPerfil"
								   class="input1"
								   maxlength="5"/>
						</td>
						<td width="16%" class="tcelda1">Tipo Perfil</td>
						<td width="16%">
							<select name="selTipoPerfil" id="selTipoPerfil" class="combo">
								<option value="">[Seleccione]</option>
								<c:forEach items="${tipoperfil}" var="item" varStatus="status">
									<option value="${item.valornumericoentero}">
										<c:out value="${item.descripcion}"/>
									</option>
								</c:forEach>
							</select>
						</td>
						<td width="20%">&nbsp;</td>
					</tr>
					<tr class="cuadrocontent">
						<td width="10%">&nbsp;</td>
						<td class="tcelda1">Descripci&oacute;n</td>
						<td colspan="3">
							<input type="text" name="txtDescripcionPerfil" id="txtDescripcionPerfil" class="input" /></td>
						<td>&nbsp;</td>
					</tr>
					<tr class="cuadrocontent">
						<td width="10%">&nbsp;</td>
						<td class="tcelda1">Estado</td>
						<td>
							<select name="selEstado" id="selEstado" class="combo">
								<option value="">[SELECCIONE]</option>
								<c:forEach items="${estadoregistro}" var="item" varStatus="status">
									<option value="${item.valornumericoentero}">
										<c:out value="${item.descripcion}"/>
									</option>
								</c:forEach>
							</select>
						</td>
						<td class="tcelda1">Permiso Extorno</td>
						<td>
							<select name="selExtorno" id="selExtorno" class="combo">
								<option value="">[SELECCIONE]</option>
								<c:forEach items="${habilitado}" var="item" varStatus="status">
									<option value="${item.valornumericoentero}">
										<c:out value="${item.descripcion}"/>
									</option>
								</c:forEach>
							</select>
						</td>
						<td></td>
					</tr>
				</table>
			</div>		</td>
	</tr>
	<tr height="24px">
		<td align="center">
			<div id="botonera">
			  <input name="btnBuscar"  id="btnBuscar" type="button" value="Buscar"  
			  	onClick="javascript:f_buscar();"  class="button1"/>
			  <input name="btnLimpiar" id="btnLimpiar" type="button" value="Limpiar" 
			  	onClick="javascript:f_limpiar();" class="button1"/>
			  <input name="btnNuevo"   id="btnNuevo" type="button" value="Nuevo"  
			  	onClick="javascript:f_nuevo();" class="button1"/>
			</div>		
		</td>
	</tr>
	<tr>
		<td valign="top">
			<div id="detalle">
				<table width="100%" border="1" cellpadding="0" cellspacing="0" >
					<tr >
						<td class="tceldatabla1" width="92">C&oacute;digo</td>
						<td class="tceldatabla1" width="454">Descripci&oacute;n</td>
						<td class="tceldatabla1" width="454">Extornar</td>
						<td class="tceldatabla1" width="454">Tipo Perfil</td>
						<td class="tceldatabla1" width="163">Estado</td>
						<td class="tceldatabla1" width="15">&nbsp;</td>
						<td class="tceldatabla1" width="14">&nbsp;</td>
						<td class="tceldatabla1" width="14">&nbsp;</td>
					</tr>
					<tr class="cuadrocontentGrilla">
						<td colspan="8" align="left" valign="top">No hay registros.</td>
					</tr>
				</table>
			</div>	  </td>
	</tr>
</table>
</form>			



</body>
</html>
<%if(sc != null)sc.removeTemporales();%>